# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>

pkgname=git-smash
pkgver=0.1.0
pkgrel=1
pkgdesc='Smash staged changes into previous commits to support your Git workflow'
url='https://github.com/anthraxx/git-smash'
arch=('loong64' 'x86_64')
license=('MIT')
depends=('glibc' 'gcc-libs' 'git')
makedepends=('cargo' 'scdoc')
optdepends=(
  'skim: selection menu alternative'
  'fzf: selection menu alternative'
)
source=(${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz
        ${url}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz.sig)
options=('!makeflags')
sha512sums=('64a8b6e2afa7007966245a4888e51251e8c35f0b82421f3cee634a3e7b82256a24459cba2941800a6e50a047766a0f8de20b435904d17df3fd456b6c09ac4c5f'
            'SKIP')
b2sums=('acc46b7a87135380fe36c378e9055b8b7c9b88a818c955f04677161f50d5ccd5699ac05f0a858dd11ca7b42b3505c0ac037f50efcd690f9e5a76be395d5d6590'
        'SKIP')
validpgpkeys=(
  'E240B57E2C4630BA768E2F26FC1B547C8D8172C8'  # Levente Polyak
)

build() {
  cd ${pkgname}-${pkgver}
  make
}

check() {
  cd ${pkgname}-${pkgver}
  make test
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" PREFIX=/usr install
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim: ts=2 sw=2 et:
